<template>
  <div>
    <!-- 卡片 -->
    <el-card class="box-card">
      <!-- 头部 -->
      <div slot="header" class="clearfix manage_header feed_header">
        <!-- 返回 -->
        <div class="back" @click="handleBack">
          <i></i>
          <span>返回</span>
        </div>
      </div>
      <!-- 表格 -->
      <el-card class="feed_main">
        <div class="feed_tab">
          <label>反馈时间</label>
          <el-select v-model="valuea" clearable placeholder="全部">
            <el-option
              :label="item.label"
              v-for="item in options"
              :value="item.value"
              :key="item.value"
            ></el-option>
          </el-select>
          <label>问题类型</label>
          <el-select v-model="valuea" clearable placeholder="全部">
            <el-option
              :label="item.label"
              v-for="item in options"
              :value="item.value"
              :key="item.value"
            ></el-option>
          </el-select>
          <label>是否解决:</label>
          <el-select v-model="valuea" clearable placeholder="全部">
            <el-option
              :label="item.label"
              v-for="item in options"
              :value="item.value"
              :key="item.value"
            ></el-option>
          </el-select>
          <!-- 搜索 -->
          <div class="search">
            <el-input placeholder="腾讯QQ" suffix-icon="el-icon-search" v-model="input1"></el-input>
          </div>
        </div>
        <!-- 表格内容 -->
        <div class="tab">
          <el-table
            :header-cell-style="{background:'#E9F4FD'}"
            :data="tableData"
            border
            style="width: 100%"
          >
            <el-table-column type="selection"></el-table-column>
            <el-table-column fixed prop="date" label="时间"></el-table-column>
            <el-table-column prop="name" label="昵称"></el-table-column>
            <el-table-column prop="province" label="问题网站"></el-table-column>
            <el-table-column prop="city" label="问题类型"></el-table-column>
            <el-table-column prop="address" label="解决完成"></el-table-column>
            <el-table-column fixed="right" label="操作">
              <template slot-scope="scope">
                <el-button @click="handleClick(scope.row)" type="text" size="small">修复</el-button>
                <el-button
                  type="text"
                  size="small"
                  @click="handleDelete(scope.$index, scope.row)"
                >删除</el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <!-- 分页 -->
        <div class="block">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[100, 200, 300, 400]"
            :page-size="100"
            layout="total, sizes, prev, pager, next, jumper"
            :total="400"
          ></el-pagination>
        </div>
      </el-card>
    </el-card>
    <!-- 模态框 -->
    <el-dialog class="delete" :visible.sync="Isdelete" :showClose="showClo=false" width="661px">
      <i @click="Isdelete= false"></i>
      <i></i>
      <h2>删除该条反馈</h2>
      <p>
        啦啦啦，问题修好了吗？修好的话就点击确定按
        <br />钮，删除之前请再次确认是否修复完成。
      </p>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleSure">确 定</el-button>
        <el-button @click="Isdelete = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import LoginVue from "./Login.vue";
export default {
  data() {
    return {
      // 点击删除弹出模态框
      Isdelete: false,
      text: "用户反馈",
      currentPage1: 5,
      currentPage2: 5,
      currentPage3: 5,
      currentPage4: 4,
      input1: "",
      options: [
        { value: "选项1", label: "最近3天" },
        { value: "选项2", label: "最近5天" },
        { value: "选项3", label: "最近10天" },
        { value: "选项4", label: "最近15天" },
        { value: "选项5", label: "最近25天" }
      ],
      valuea: "全部",
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
          zip: 200333
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1517 弄",
          zip: 200333
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1519 弄",
          zip: 200333
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          province: "上海",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1516 弄",
          zip: 200333
        }
      ]
    };
  },
  methods: {
    handleBack() {
      this.$router.go(-1);
    },
    handleClick(row) {
      console.log(row);
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
    handleDelete() {
      this.Isdelete = true;
    },
    // 点击确认
    handleSure() {
      this.$confirm("确认删除？")
        .then(_ => {
          done();
        })
        .catch(_ => {});
    }
  }
};
</script>

<style scoped>
.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}
.manage_header {
  margin: 28px 0 27px 50px;
  position: relative;
}
.manage_header i {
  /* display: block; */
  position: absolute;
  top: 5px;
  left: 0;
  width: 10px;
  height: 20px;
  background: url("../assets/img/left.png") no-repeat;
  background-size: 10px 20px;
  vertical-align: middle;
}
.manage_header span {
  position: absolute;
  top: 0px;
  left: 22px;
  margin: 0;
  font-size: 20px;
  color: #3f51b5;
}
label {
  margin-left: 24px;
  margin-right: 10px;
  font-size: 16px;
  color: #666666;
}
.el-select {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 5px;
}
.feed_tab {
  position: relative;
}
.search {
  position: absolute;
  top: 0;
  right: 0;
  width: 276px;
  height: 40px;
  margin-right: 10px;
}
.tab {
  margin-top: 32px;
}
tr {
  background-color: #e9f4fd;
}
.block {
  margin-top: 40px;
}
button i {
  vertical-align: middle;
}
.el-pager,
.el-pager li {
  margin: -3px;
}
.el-pagination {
  text-align: center;
}
.el-dialog {
  position: relative;
}
.delete i:nth-child(1) {
  position: absolute;
  top: 10px;
  right: 10px;
  display: block;
  width: 40px;
  height: 40px;
  background: url("../assets/img/close.png") no-repeat;
  background-size: 40px;
}
.delete i:nth-child(2) {
  display: block;
  margin: 0 auto;
  width: 38px;
  height: 38px;
  background: url("../assets/img/garbage.png") no-repeat;
  background-size: 38px;
}
.delete h2 {
  font-size: 24px;
  font-weight: 400;
  color: #212121;
  text-align: center;
  margin: 0;
  margin: 20px 0 28px;
  line-height: 47px;
}
.delete p {
  text-align: center;

  font-size: 16px;
  font-weight: 400;
  text-align: center;
  color: #757575;
}
.dialog-footer {
  margin: 0 50px 76px;
}
.dialog-footer .el-button {
  width: 240px;
  height: 47px;
  font-size: 18px;
  margin-bottom: 50px;
}
.dialog-footer .el-button:nth-child(1) {
  background: url("../assets/img/btn.png") no-repeat;
  background-size: 240px 47px;
  border: none;
  color: #fff;
}
.dialog-footer .el-button:nth-child(2) {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}
.el-table .el-button {


font-size: 18px;

color: #212121;

}
</style>